//
//  main.m
//  OCExam
//
//  Created by dllo on 16/6/2.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Person.h"
#import "AddressBook.h"
int main(int argc, const char * argv[]) {
    
    
    
    Person *per1 = [Person personWithName:@"Lucy" withSex:@"女" withPhone:@"123" withAge:21];
    
    Person *per2 = [Person personWithName:@"Joe" withSex:@"男" withPhone:@"456" withAge:17];
    
    Person *per3 = [Person personWithName:@"Baby" withSex:@"女" withPhone:@"789" withAge:27];
    
    Person *per4 = [Person personWithName:@"Linda" withSex:@"女" withPhone:@"000" withAge:21];
    
    AddressBook *addressBook1 = [[AddressBook alloc] init];
    
    
    
    
    
    [addressBook1 addPerson:per1];
    [addressBook1 addPerson:per2];
    [addressBook1 addPerson:per3];
    [addressBook1 addPerson:per4];
    
    
    [addressBook1 showAll];
    
    
//    NSLog(@"%@",[addressBook1 findPersonWithPhoneNum:@"123"]);
    
    
//    for (Person *per in [addressBook1 findPersonsWithSex:@"女"]){
//        NSLog(@"%@",per);
//    }
    
//    for (Person *per in [addressBook1 ])
    
    
    return 0;
}
